Controlling transformations with Lingo

QuickTime 3 provides the ability to rotate, scale, and offset a QuickTime cast member's image within its sprite's bounding rectangle. You can take advantage of these new features using Lingo; for more information, see the rotation property, scale property, and translation property.

You can set the rotation, scale, and translation properties for either a cast member or a sprite. When you create a new QuickTime 3 sprite, the sprite takes the current property values stored with the cast member. If the cast member's property values change, the changes are broadcast to any of the cast member's sprites currently on the stage. The exception is that, once you set a property for a sprite, changes in that property to the cast member have no effect on the sprite.

For example, imagine that cast member 1 is QuickTime 3 media. Two sprites from this cast member are currently on the stage in channels 4 and 5. The following three commands in the Message window show that the sprites in channels 4 and 5 have the same rotation property setting as their cast member.

put the rotation of member 1
-- 45
put the rotation of sprite 4
-- 45
put the rotation of sprite 5
-- 45

The following commands demonstration that setting the rotation of the cast member broadcasts the change to its sprites.

set the rotation of member 1 = 90
put the rotation of sprite 4
-- 90
put the rotation of sprite 5
-- 90

Now notice that setting the rotation of sprite 4 does not affect the cast member, nor does it affect the other sprite.

set the rotation of sprite 4 = 180
put the rotation of member 1 
-- 90
put the rotation of sprite 4
-- 180
put the rotation of sprite 5
-- 90

Finally, the following commands demonstrate that setting the rotation of the cast member affects the rotation of sprite 5 but it does not affect the rotation of sprite 4, because the rotation of sprite 4 was already explicitly set.

set the rotation of member 1 = 0
put the rotation of sprite 4
-- 180
put the rotation of sprite 5
-- 0